import { createRouter, createWebHistory } from "vue-router";
import login from '@/views/login.vue';
import home from '@/views/home.vue';
import workplace from '@/components/workplace.vue';
import analysis from '@/components/analysis.vue';
import complaintHandling from '@/components/complaintHandling.vue';
import orderManagement from '@/components/orderManagement.vue';
import taskType from '@/components/taskType.vue';
import noPage from '@/components/noPage.vue';
const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/',
            redirect: '/login',
        },
        {
            path: '/login',
            component: login,
        },
        {
            path: '/home',
            component: home,
            children: [
                {
                    path: '',
                    redirect: '/home/workplace',
                },
                {
                    path: 'workplace',
                    component: workplace,
                },
                {
                    path: 'analysis',
                    component: analysis,
                },
                {
                    path: 'complaintHandling',
                    component: taskType,
                },
                {
                    path: 'orderManagement',
                    component: taskType,
                },
                {
                    path: 'taskType',
                    component: taskType,
                },
                {
                    path: 'noPage',
                    component: noPage,
                },
            ]
        },
    ]
})
export default router;